<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div>		
		<button οnclick="nextImg()">下一张</button>	
		<button οnclick="nextImg()">上一张</button>
		<button οnclick="nextImg()">1</button>
		<button οnclick="nextImg()">2</button>
		<button οnclick="nextImg()">3</button>
		<button οnclick="nextImg()">4</button>
			<br />
			<img src="t019a4420c020f38593.jpg"  id="nImg" width="600px" height="400px" />
				
			</div>	
			</body>	
			<script>
				var i = 1;
						function nextImg(){i++;
						var next = document.getElementById("nImg");
						next.src = "img/pic"+i+".jpg";
						if(i==3)
						{i=0;} 		
						}
			</script>
		   	
		     

</html>
